package com.itjiange;

import java.util.Iterator;
import java.util.List;

/**
 * @author ItJianGe
 * @data 2024/8/26 10:40
 */
public class AMenusIterator implements MenuIterator {

    private Iterator<MenuItem> menuItemIterator;

    public AMenusIterator(List<MenuItem> menuItems) {
        this.menuItemIterator = menuItems.iterator();
    }

    @Override
    public boolean hasNext() {
        return menuItemIterator.hasNext();
    }

    @Override
    public MenuItem next() {
        return menuItemIterator.next();
    }
}
